export default {
  filterBankCards: (state, getters) => (cardType) => {
    return state.bankCards.filter(bankCard => parseInt(bankCard['type']) === parseInt(cardType))
  },
  getPrimaryBankCard: (state, getters) => (cardType) => {
    return state.bankCards.filter(bankCard => parseInt(bankCard['type']) === parseInt(cardType) && parseInt(bankCard['primary']) === 1)
  },
  getBankCardByCardId: (state, getters) => (id) => {
    return state.bankCards.filter(bankCard => bankCard.id === id)
  },
  authorized: (state, getters) => {
    return state.authorized
  }
}
